
<?php
	//flip the order
	//si hay mensajes
	if (isset($messages) && !empty($messages)) {
		//printf('<p><font color=#000000>CHAT</font></p>');
		foreach($messages as $i => $message) {
			//$class = ($i % 2 == 0) ? 'odd':'even';
			printf('<p class="usernameChat"><strong>%s </strong>(%s):<font color=#000000> %s</font></p>', $message['Chat']['name'],
			       $time->timeAgoInWords($message['Chat']['created']),$message['Chat']['message']);
		}
	} else {
		echo '<p>' . __('No hay mensajes', true) . '</p>';
	}
?>